Skip to content

fix: pass run_main/vacant/hedonic/ensemble flags through finalize_models#314

Open
drussellmrichie wants to merge 1 commit intolarsiusprime:masterfrom
drussellmrichie:fix/pipeline-finalize-models-run-flags
Open

fix: pass run_main/vacant/hedonic/ensemble flags through finalize_models#314
drussellmrichie wants to merge 1 commit intolarsiusprime:masterfrom
drussellmrichie:fix/pipeline-finalize-models-run-flags

Conversation

@drussellmrichie
Copy link
Copy Markdown

Problem

finalize_models() accepted no model-type flags and hardcoded run_main=True, run_vacant=True, run_hedonic=True, run_ensemble=True in its internal call to benchmark.run_models().

This means callers that disable certain model types (e.g. run_vacant=False, run_hedonic=False) would still trigger those model types during finalize_models, causing crashes when no sales data exists for those types -- specifically a ValueError: Input data must be 2 dimensional and non empty from LightGBM when the validation set is empty.

Note that try_models() already accepts and passes through these flags correctly; finalize_models() was inconsistent.

Fix

Add run_main, run_vacant, run_hedonic, run_ensemble keyword arguments to finalize_models with the same defaults as before (all True), and pass them through to benchmark.run_models. The docstring is updated accordingly.

finalize_models() accepted no model-type flags and hardcoded
run_main=True, run_vacant=True, run_hedonic=True, run_ensemble=True
in its internal call to benchmark.run_models().

This means callers that disable certain model types in settings.json
(e.g. run_vacant: false, run_hedonic: false) would still trigger those
model types during finalize_models, leading to crashes when no sales
data exists for those types (empty LightGBM validation set).

The fix adds run_main, run_vacant, run_hedonic, run_ensemble keyword
arguments to finalize_models with the same defaults as before (all True),
and passes them through to benchmark.run_models.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Please sign our CLA at the following link:
Click here to sign the CLA.
A maintainer will verify your signature and confirm it here by commenting with the following sentence:


I affirm that this contributor has signed the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant